import service from "@/util/request";

// 分页查询请假信息
export function getHoliday() {
    return service({
        url: '/holi/getAll',
        method: 'get'
    })
}

// 添加请假信息
export function addHoli(data) {
    return service({
        url: '/holi/add',
        method: 'post',
        data
    })
}

// 模糊查询请假信息
export function likeHoli(data) {
    return service({
        url: '/holi/like',
        method: 'post',
        data
    })
}

// 删除请假信息
export function deleteHoli(id) {
    return service({
        url: '/holi/delete/' + id,
        method: 'get'
    })
}

// 修改请假信息
export function editHoli(holiday, userInfo) {
    return service({
        url: '/holi/edit',
        method: 'post',
        data: {
            holiday,
            userInfo
        }
    })
}